package com.ecoolex.discount.sales.entity;

import com.ecoolex.framework.common.annotation.Description;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.springframework.lang.NonNull;

public class UPlanCouponExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    protected Integer offset;

    protected Integer rows;

    public UPlanCouponExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public UPlanCouponExample orderBy(String orderByClause) {
        this.setOrderByClause(orderByClause);
        return this;
    }

    public UPlanCouponExample orderBy(String ... orderByClauses) {
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < orderByClauses.length; i++) {
            sb.append(orderByClauses[i]);
            if (i < orderByClauses.length - 1) {
                sb.append(" , ");
            }
        }
        this.setOrderByClause(sb.toString());
        return this;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria(this);
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
        rows = null;
        offset = null;
    }

    public static Criteria newAndCreateCriteria() {
        UPlanCouponExample example = new UPlanCouponExample();
        return example.createCriteria();
    }

    public UPlanCouponExample when(boolean condition, IExampleWhen then) {
        if (condition) {
            then.example(this);
        }
        return this;
    }

    public UPlanCouponExample when(boolean condition, IExampleWhen then, IExampleWhen otherwise) {
        if (condition) {
            then.example(this);
        } else {
            otherwise.example(this);
        }
        return this;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return this.offset;
    }

    public void setRows(Integer rows) {
        this.rows = rows;
    }

    public Integer getRows() {
        return this.rows;
    }

    public UPlanCouponExample limit(Integer rows) {
        this.rows = rows;
        return this;
    }

    public UPlanCouponExample limit(Integer offset, Integer rows) {
        this.offset = offset;
        this.rows = rows;
        return this;
    }

    public UPlanCouponExample page(Integer page, Integer pageSize) {
        this.offset = page * pageSize;
        this.rows = pageSize;
        return this;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("uplancoupon.Id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("uplancoupon.Id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("uplancoupon.Id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.Id = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("uplancoupon.Id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.Id <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("uplancoupon.Id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.Id > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("uplancoupon.Id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.Id >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("uplancoupon.Id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.Id < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("uplancoupon.Id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.Id <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("uplancoupon.Id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("uplancoupon.Id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("uplancoupon.Id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("uplancoupon.Id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andBatchIdIsNull() {
            addCriterion("uplancoupon.BatchId is null");
            return (Criteria) this;
        }

        public Criteria andBatchIdIsNotNull() {
            addCriterion("uplancoupon.BatchId is not null");
            return (Criteria) this;
        }

        public Criteria andBatchIdEqualTo(Long value) {
            addCriterion("uplancoupon.BatchId =", value, "batchId");
            return (Criteria) this;
        }

        public Criteria andBatchIdEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.BatchId = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andBatchIdNotEqualTo(Long value) {
            addCriterion("uplancoupon.BatchId <>", value, "batchId");
            return (Criteria) this;
        }

        public Criteria andBatchIdNotEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.BatchId <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andBatchIdGreaterThan(Long value) {
            addCriterion("uplancoupon.BatchId >", value, "batchId");
            return (Criteria) this;
        }

        public Criteria andBatchIdGreaterThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.BatchId > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andBatchIdGreaterThanOrEqualTo(Long value) {
            addCriterion("uplancoupon.BatchId >=", value, "batchId");
            return (Criteria) this;
        }

        public Criteria andBatchIdGreaterThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.BatchId >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andBatchIdLessThan(Long value) {
            addCriterion("uplancoupon.BatchId <", value, "batchId");
            return (Criteria) this;
        }

        public Criteria andBatchIdLessThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.BatchId < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andBatchIdLessThanOrEqualTo(Long value) {
            addCriterion("uplancoupon.BatchId <=", value, "batchId");
            return (Criteria) this;
        }

        public Criteria andBatchIdLessThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.BatchId <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andBatchIdIn(List<Long> values) {
            addCriterion("uplancoupon.BatchId in", values, "batchId");
            return (Criteria) this;
        }

        public Criteria andBatchIdNotIn(List<Long> values) {
            addCriterion("uplancoupon.BatchId not in", values, "batchId");
            return (Criteria) this;
        }

        public Criteria andBatchIdBetween(Long value1, Long value2) {
            addCriterion("uplancoupon.BatchId between", value1, value2, "batchId");
            return (Criteria) this;
        }

        public Criteria andBatchIdNotBetween(Long value1, Long value2) {
            addCriterion("uplancoupon.BatchId not between", value1, value2, "batchId");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeIsNull() {
            addCriterion("uplancoupon.PromotionCode is null");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeIsNotNull() {
            addCriterion("uplancoupon.PromotionCode is not null");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeEqualTo(String value) {
            addCriterion("uplancoupon.PromotionCode =", value, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.PromotionCode = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPromotionCodeNotEqualTo(String value) {
            addCriterion("uplancoupon.PromotionCode <>", value, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeNotEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.PromotionCode <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPromotionCodeGreaterThan(String value) {
            addCriterion("uplancoupon.PromotionCode >", value, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeGreaterThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.PromotionCode > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPromotionCodeGreaterThanOrEqualTo(String value) {
            addCriterion("uplancoupon.PromotionCode >=", value, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeGreaterThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.PromotionCode >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPromotionCodeLessThan(String value) {
            addCriterion("uplancoupon.PromotionCode <", value, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeLessThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.PromotionCode < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPromotionCodeLessThanOrEqualTo(String value) {
            addCriterion("uplancoupon.PromotionCode <=", value, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeLessThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.PromotionCode <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPromotionCodeLike(String value) {
            addCriterion("uplancoupon.PromotionCode like", value, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeNotLike(String value) {
            addCriterion("uplancoupon.PromotionCode not like", value, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeIn(List<String> values) {
            addCriterion("uplancoupon.PromotionCode in", values, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeNotIn(List<String> values) {
            addCriterion("uplancoupon.PromotionCode not in", values, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeBetween(String value1, String value2) {
            addCriterion("uplancoupon.PromotionCode between", value1, value2, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andPromotionCodeNotBetween(String value1, String value2) {
            addCriterion("uplancoupon.PromotionCode not between", value1, value2, "promotionCode");
            return (Criteria) this;
        }

        public Criteria andCouponCodeIsNull() {
            addCriterion("uplancoupon.CouponCode is null");
            return (Criteria) this;
        }

        public Criteria andCouponCodeIsNotNull() {
            addCriterion("uplancoupon.CouponCode is not null");
            return (Criteria) this;
        }

        public Criteria andCouponCodeEqualTo(String value) {
            addCriterion("uplancoupon.CouponCode =", value, "couponCode");
            return (Criteria) this;
        }

        public Criteria andCouponCodeEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.CouponCode = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCouponCodeNotEqualTo(String value) {
            addCriterion("uplancoupon.CouponCode <>", value, "couponCode");
            return (Criteria) this;
        }

        public Criteria andCouponCodeNotEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.CouponCode <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCouponCodeGreaterThan(String value) {
            addCriterion("uplancoupon.CouponCode >", value, "couponCode");
            return (Criteria) this;
        }

        public Criteria andCouponCodeGreaterThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.CouponCode > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCouponCodeGreaterThanOrEqualTo(String value) {
            addCriterion("uplancoupon.CouponCode >=", value, "couponCode");
            return (Criteria) this;
        }

        public Criteria andCouponCodeGreaterThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.CouponCode >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCouponCodeLessThan(String value) {
            addCriterion("uplancoupon.CouponCode <", value, "couponCode");
            return (Criteria) this;
        }

        public Criteria andCouponCodeLessThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.CouponCode < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCouponCodeLessThanOrEqualTo(String value) {
            addCriterion("uplancoupon.CouponCode <=", value, "couponCode");
            return (Criteria) this;
        }

        public Criteria andCouponCodeLessThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.CouponCode <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCouponCodeLike(String value) {
            addCriterion("uplancoupon.CouponCode like", value, "couponCode");
            return (Criteria) this;
        }

        public Criteria andCouponCodeNotLike(String value) {
            addCriterion("uplancoupon.CouponCode not like", value, "couponCode");
            return (Criteria) this;
        }

        public Criteria andCouponCodeIn(List<String> values) {
            addCriterion("uplancoupon.CouponCode in", values, "couponCode");
            return (Criteria) this;
        }

        public Criteria andCouponCodeNotIn(List<String> values) {
            addCriterion("uplancoupon.CouponCode not in", values, "couponCode");
            return (Criteria) this;
        }

        public Criteria andCouponCodeBetween(String value1, String value2) {
            addCriterion("uplancoupon.CouponCode between", value1, value2, "couponCode");
            return (Criteria) this;
        }

        public Criteria andCouponCodeNotBetween(String value1, String value2) {
            addCriterion("uplancoupon.CouponCode not between", value1, value2, "couponCode");
            return (Criteria) this;
        }

        public Criteria andValidStartDateIsNull() {
            addCriterion("uplancoupon.ValidStartDate is null");
            return (Criteria) this;
        }

        public Criteria andValidStartDateIsNotNull() {
            addCriterion("uplancoupon.ValidStartDate is not null");
            return (Criteria) this;
        }

        public Criteria andValidStartDateEqualTo(Date value) {
            addCriterion("uplancoupon.ValidStartDate =", value, "validStartDate");
            return (Criteria) this;
        }

        public Criteria andValidStartDateEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.ValidStartDate = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andValidStartDateNotEqualTo(Date value) {
            addCriterion("uplancoupon.ValidStartDate <>", value, "validStartDate");
            return (Criteria) this;
        }

        public Criteria andValidStartDateNotEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.ValidStartDate <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andValidStartDateGreaterThan(Date value) {
            addCriterion("uplancoupon.ValidStartDate >", value, "validStartDate");
            return (Criteria) this;
        }

        public Criteria andValidStartDateGreaterThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.ValidStartDate > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andValidStartDateGreaterThanOrEqualTo(Date value) {
            addCriterion("uplancoupon.ValidStartDate >=", value, "validStartDate");
            return (Criteria) this;
        }

        public Criteria andValidStartDateGreaterThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.ValidStartDate >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andValidStartDateLessThan(Date value) {
            addCriterion("uplancoupon.ValidStartDate <", value, "validStartDate");
            return (Criteria) this;
        }

        public Criteria andValidStartDateLessThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.ValidStartDate < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andValidStartDateLessThanOrEqualTo(Date value) {
            addCriterion("uplancoupon.ValidStartDate <=", value, "validStartDate");
            return (Criteria) this;
        }

        public Criteria andValidStartDateLessThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.ValidStartDate <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andValidStartDateIn(List<Date> values) {
            addCriterion("uplancoupon.ValidStartDate in", values, "validStartDate");
            return (Criteria) this;
        }

        public Criteria andValidStartDateNotIn(List<Date> values) {
            addCriterion("uplancoupon.ValidStartDate not in", values, "validStartDate");
            return (Criteria) this;
        }

        public Criteria andValidStartDateBetween(Date value1, Date value2) {
            addCriterion("uplancoupon.ValidStartDate between", value1, value2, "validStartDate");
            return (Criteria) this;
        }

        public Criteria andValidStartDateNotBetween(Date value1, Date value2) {
            addCriterion("uplancoupon.ValidStartDate not between", value1, value2, "validStartDate");
            return (Criteria) this;
        }

        public Criteria andValidEndDateIsNull() {
            addCriterion("uplancoupon.ValidEndDate is null");
            return (Criteria) this;
        }

        public Criteria andValidEndDateIsNotNull() {
            addCriterion("uplancoupon.ValidEndDate is not null");
            return (Criteria) this;
        }

        public Criteria andValidEndDateEqualTo(Date value) {
            addCriterion("uplancoupon.ValidEndDate =", value, "validEndDate");
            return (Criteria) this;
        }

        public Criteria andValidEndDateEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.ValidEndDate = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andValidEndDateNotEqualTo(Date value) {
            addCriterion("uplancoupon.ValidEndDate <>", value, "validEndDate");
            return (Criteria) this;
        }

        public Criteria andValidEndDateNotEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.ValidEndDate <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andValidEndDateGreaterThan(Date value) {
            addCriterion("uplancoupon.ValidEndDate >", value, "validEndDate");
            return (Criteria) this;
        }

        public Criteria andValidEndDateGreaterThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.ValidEndDate > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andValidEndDateGreaterThanOrEqualTo(Date value) {
            addCriterion("uplancoupon.ValidEndDate >=", value, "validEndDate");
            return (Criteria) this;
        }

        public Criteria andValidEndDateGreaterThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.ValidEndDate >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andValidEndDateLessThan(Date value) {
            addCriterion("uplancoupon.ValidEndDate <", value, "validEndDate");
            return (Criteria) this;
        }

        public Criteria andValidEndDateLessThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.ValidEndDate < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andValidEndDateLessThanOrEqualTo(Date value) {
            addCriterion("uplancoupon.ValidEndDate <=", value, "validEndDate");
            return (Criteria) this;
        }

        public Criteria andValidEndDateLessThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.ValidEndDate <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andValidEndDateIn(List<Date> values) {
            addCriterion("uplancoupon.ValidEndDate in", values, "validEndDate");
            return (Criteria) this;
        }

        public Criteria andValidEndDateNotIn(List<Date> values) {
            addCriterion("uplancoupon.ValidEndDate not in", values, "validEndDate");
            return (Criteria) this;
        }

        public Criteria andValidEndDateBetween(Date value1, Date value2) {
            addCriterion("uplancoupon.ValidEndDate between", value1, value2, "validEndDate");
            return (Criteria) this;
        }

        public Criteria andValidEndDateNotBetween(Date value1, Date value2) {
            addCriterion("uplancoupon.ValidEndDate not between", value1, value2, "validEndDate");
            return (Criteria) this;
        }

        public Criteria andReferenceIsNull() {
            addCriterion("uplancoupon.Reference is null");
            return (Criteria) this;
        }

        public Criteria andReferenceIsNotNull() {
            addCriterion("uplancoupon.Reference is not null");
            return (Criteria) this;
        }

        public Criteria andReferenceEqualTo(String value) {
            addCriterion("uplancoupon.Reference =", value, "reference");
            return (Criteria) this;
        }

        public Criteria andReferenceEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.Reference = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andReferenceNotEqualTo(String value) {
            addCriterion("uplancoupon.Reference <>", value, "reference");
            return (Criteria) this;
        }

        public Criteria andReferenceNotEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.Reference <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andReferenceGreaterThan(String value) {
            addCriterion("uplancoupon.Reference >", value, "reference");
            return (Criteria) this;
        }

        public Criteria andReferenceGreaterThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.Reference > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andReferenceGreaterThanOrEqualTo(String value) {
            addCriterion("uplancoupon.Reference >=", value, "reference");
            return (Criteria) this;
        }

        public Criteria andReferenceGreaterThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.Reference >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andReferenceLessThan(String value) {
            addCriterion("uplancoupon.Reference <", value, "reference");
            return (Criteria) this;
        }

        public Criteria andReferenceLessThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.Reference < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andReferenceLessThanOrEqualTo(String value) {
            addCriterion("uplancoupon.Reference <=", value, "reference");
            return (Criteria) this;
        }

        public Criteria andReferenceLessThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.Reference <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andReferenceLike(String value) {
            addCriterion("uplancoupon.Reference like", value, "reference");
            return (Criteria) this;
        }

        public Criteria andReferenceNotLike(String value) {
            addCriterion("uplancoupon.Reference not like", value, "reference");
            return (Criteria) this;
        }

        public Criteria andReferenceIn(List<String> values) {
            addCriterion("uplancoupon.Reference in", values, "reference");
            return (Criteria) this;
        }

        public Criteria andReferenceNotIn(List<String> values) {
            addCriterion("uplancoupon.Reference not in", values, "reference");
            return (Criteria) this;
        }

        public Criteria andReferenceBetween(String value1, String value2) {
            addCriterion("uplancoupon.Reference between", value1, value2, "reference");
            return (Criteria) this;
        }

        public Criteria andReferenceNotBetween(String value1, String value2) {
            addCriterion("uplancoupon.Reference not between", value1, value2, "reference");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("uplancoupon.`Status` is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("uplancoupon.`Status` is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Long value) {
            addCriterion("uplancoupon.`Status` =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.`Status` = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Long value) {
            addCriterion("uplancoupon.`Status` <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.`Status` <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Long value) {
            addCriterion("uplancoupon.`Status` >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.`Status` > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Long value) {
            addCriterion("uplancoupon.`Status` >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.`Status` >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Long value) {
            addCriterion("uplancoupon.`Status` <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.`Status` < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Long value) {
            addCriterion("uplancoupon.`Status` <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.`Status` <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Long> values) {
            addCriterion("uplancoupon.`Status` in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Long> values) {
            addCriterion("uplancoupon.`Status` not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Long value1, Long value2) {
            addCriterion("uplancoupon.`Status` between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Long value1, Long value2) {
            addCriterion("uplancoupon.`Status` not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andDeletedIsNull() {
            addCriterion("uplancoupon.Deleted is null");
            return (Criteria) this;
        }

        public Criteria andDeletedIsNotNull() {
            addCriterion("uplancoupon.Deleted is not null");
            return (Criteria) this;
        }

        public Criteria andDeletedEqualTo(Boolean value) {
            addCriterion("uplancoupon.Deleted =", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.Deleted = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedNotEqualTo(Boolean value) {
            addCriterion("uplancoupon.Deleted <>", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedNotEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.Deleted <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThan(Boolean value) {
            addCriterion("uplancoupon.Deleted >", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.Deleted > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThanOrEqualTo(Boolean value) {
            addCriterion("uplancoupon.Deleted >=", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.Deleted >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedLessThan(Boolean value) {
            addCriterion("uplancoupon.Deleted <", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedLessThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.Deleted < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedLessThanOrEqualTo(Boolean value) {
            addCriterion("uplancoupon.Deleted <=", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedLessThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.Deleted <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedIn(List<Boolean> values) {
            addCriterion("uplancoupon.Deleted in", values, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedNotIn(List<Boolean> values) {
            addCriterion("uplancoupon.Deleted not in", values, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedBetween(Boolean value1, Boolean value2) {
            addCriterion("uplancoupon.Deleted between", value1, value2, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedNotBetween(Boolean value1, Boolean value2) {
            addCriterion("uplancoupon.Deleted not between", value1, value2, "deleted");
            return (Criteria) this;
        }

        public Criteria andCreateUserIsNull() {
            addCriterion("uplancoupon.`CreateUser` is null");
            return (Criteria) this;
        }

        public Criteria andCreateUserIsNotNull() {
            addCriterion("uplancoupon.`CreateUser` is not null");
            return (Criteria) this;
        }

        public Criteria andCreateUserEqualTo(String value) {
            addCriterion("uplancoupon.`CreateUser` =", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.`CreateUser` = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserNotEqualTo(String value) {
            addCriterion("uplancoupon.`CreateUser` <>", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.`CreateUser` <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThan(String value) {
            addCriterion("uplancoupon.`CreateUser` >", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.`CreateUser` > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThanOrEqualTo(String value) {
            addCriterion("uplancoupon.`CreateUser` >=", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.`CreateUser` >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThan(String value) {
            addCriterion("uplancoupon.`CreateUser` <", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.`CreateUser` < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThanOrEqualTo(String value) {
            addCriterion("uplancoupon.`CreateUser` <=", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.`CreateUser` <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserLike(String value) {
            addCriterion("uplancoupon.`CreateUser` like", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotLike(String value) {
            addCriterion("uplancoupon.`CreateUser` not like", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserIn(List<String> values) {
            addCriterion("uplancoupon.`CreateUser` in", values, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotIn(List<String> values) {
            addCriterion("uplancoupon.`CreateUser` not in", values, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserBetween(String value1, String value2) {
            addCriterion("uplancoupon.`CreateUser` between", value1, value2, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotBetween(String value1, String value2) {
            addCriterion("uplancoupon.`CreateUser` not between", value1, value2, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNull() {
            addCriterion("uplancoupon.CreateTime is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNotNull() {
            addCriterion("uplancoupon.CreateTime is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualTo(Date value) {
            addCriterion("uplancoupon.CreateTime =", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.CreateTime = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualTo(Date value) {
            addCriterion("uplancoupon.CreateTime <>", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.CreateTime <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThan(Date value) {
            addCriterion("uplancoupon.CreateTime >", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.CreateTime > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("uplancoupon.CreateTime >=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.CreateTime >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThan(Date value) {
            addCriterion("uplancoupon.CreateTime <", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.CreateTime < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("uplancoupon.CreateTime <=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.CreateTime <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeIn(List<Date> values) {
            addCriterion("uplancoupon.CreateTime in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotIn(List<Date> values) {
            addCriterion("uplancoupon.CreateTime not in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeBetween(Date value1, Date value2) {
            addCriterion("uplancoupon.CreateTime between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("uplancoupon.CreateTime not between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIsNull() {
            addCriterion("uplancoupon.UpdateUser is null");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIsNotNull() {
            addCriterion("uplancoupon.UpdateUser is not null");
            return (Criteria) this;
        }

        public Criteria andUpdateUserEqualTo(String value) {
            addCriterion("uplancoupon.UpdateUser =", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.UpdateUser = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotEqualTo(String value) {
            addCriterion("uplancoupon.UpdateUser <>", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.UpdateUser <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThan(String value) {
            addCriterion("uplancoupon.UpdateUser >", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.UpdateUser > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThanOrEqualTo(String value) {
            addCriterion("uplancoupon.UpdateUser >=", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.UpdateUser >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThan(String value) {
            addCriterion("uplancoupon.UpdateUser <", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.UpdateUser < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThanOrEqualTo(String value) {
            addCriterion("uplancoupon.UpdateUser <=", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.UpdateUser <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserLike(String value) {
            addCriterion("uplancoupon.UpdateUser like", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotLike(String value) {
            addCriterion("uplancoupon.UpdateUser not like", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIn(List<String> values) {
            addCriterion("uplancoupon.UpdateUser in", values, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotIn(List<String> values) {
            addCriterion("uplancoupon.UpdateUser not in", values, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserBetween(String value1, String value2) {
            addCriterion("uplancoupon.UpdateUser between", value1, value2, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotBetween(String value1, String value2) {
            addCriterion("uplancoupon.UpdateUser not between", value1, value2, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIsNull() {
            addCriterion("uplancoupon.UpdateTime is null");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIsNotNull() {
            addCriterion("uplancoupon.UpdateTime is not null");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeEqualTo(Date value) {
            addCriterion("uplancoupon.UpdateTime =", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.UpdateTime = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotEqualTo(Date value) {
            addCriterion("uplancoupon.UpdateTime <>", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.UpdateTime <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThan(Date value) {
            addCriterion("uplancoupon.UpdateTime >", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.UpdateTime > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("uplancoupon.UpdateTime >=", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.UpdateTime >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThan(Date value) {
            addCriterion("uplancoupon.UpdateTime <", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThanColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.UpdateTime < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
            addCriterion("uplancoupon.UpdateTime <=", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThanOrEqualToColumn(UPlanCoupon.Column column) {
            addCriterion(new StringBuilder("uplancoupon.UpdateTime <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIn(List<Date> values) {
            addCriterion("uplancoupon.UpdateTime in", values, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotIn(List<Date> values) {
            addCriterion("uplancoupon.UpdateTime not in", values, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
            addCriterion("uplancoupon.UpdateTime between", value1, value2, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
            addCriterion("uplancoupon.UpdateTime not between", value1, value2, "updateTime");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {
        private UPlanCouponExample example;

        protected Criteria(UPlanCouponExample example) {
            super();
            this.example = example;
        }

        public UPlanCouponExample example() {
            return this.example;
        }

        @Deprecated
        public Criteria andIf(boolean ifAdd, ICriteriaAdd add) {
            if (ifAdd) {
                add.add(this);
            }
            return this;
        }

        public Criteria when(boolean condition, ICriteriaWhen then) {
            if (condition) {
                then.criteria(this);
            }
            return this;
        }

        public Criteria when(boolean condition, ICriteriaWhen then, ICriteriaWhen otherwise) {
            if (condition) {
                then.criteria(this);
            } else {
                otherwise.criteria(this);
            }
            return this;
        }

        public Criteria andLogicalDeleted(boolean deleted) {
            return deleted ? andDeletedEqualTo(UPlanCoupon.Deleted.IS_DELETED.value()) : andDeletedNotEqualTo(UPlanCoupon.Deleted.IS_DELETED.value());
        }

        @Deprecated
        public interface ICriteriaAdd {
            Criteria add(Criteria add);
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }

    public interface ICriteriaWhen {
        void criteria(Criteria criteria);
    }

    public interface IExampleWhen {
        void example(com.ecoolex.discount.sales.entity.UPlanCouponExample example);
    }
}